public class Holder2<T> {
    private T a;

    public Holder2(T a) {
        this.a = a;
    }

    public T get() {
        return a;
    }

    public void set(T a) {
        this.a = a;
    }

    public static void main(String[] args) {
        Holder2<String> holder2 = new Holder2<>("Generic");
        String str = holder2.get();
        System.out.println("str: " + str);

        holder2.set("test");
        str = holder2.get();
        System.out.println("str: " + str);
    }
}
